/*
 * @(#)XMLErrorHandler.java
 *
 *
 * ver 1.0 Oct 13, 2007 ggranum
 */
package org.testfire.util;

import org.w3c.dom.DOMErrorHandler;
import org.w3c.dom.DOMError;

public class XMLErrorHandler implements DOMErrorHandler
{

    protected DOMError error;

    public XMLErrorHandler()
    {
    }

    public boolean handleError( DOMError error )
    {
        this.error = error;
        return true;
    }

    public DOMError getError()
    {
        if ( error != null )
        {
            System.out.println( error.getMessage() );
        }

        return error;
    }
}

// eof: XMLErrorHandler.java